package com.veetao.api.service.impl;

import org.springframework.stereotype.Service;
import org.springframework.web.servlet.support.RequestContext;

import com.veetao.api.model.CommandContext;

/**
 * 
 * @author guohongtao
 * @date 2017年9月22日
 */
@Service
public class I18nTipService {
	public I18nTipService() {
		super();
	}

	public String getTipMessage(String labelName, CommandContext context) {
//		String locale = context.getLocale();
		if(context == null) {
			return labelName;
		}
		RequestContext requestContext = new RequestContext(context.getHttpServletRequest());
        
        
		return requestContext.getMessage(labelName);
	}
	
}
